﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace HengTong.DataAccess.Migrations
{
    /// <inheritdoc />
    public partial class 待办新增订单编号 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ProcessInstanceId",
                table: "SysTodoCenter");

            migrationBuilder.RenameColumn(
                name: "BusinessId",
                table: "SysTodoCenter",
                newName: "ActivityId");

            migrationBuilder.AddColumn<string>(
                name: "BillCode",
                table: "SysWorkflow",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BillCode",
                table: "SysTodoCenter",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreateBy",
                table: "SysTodoCenter",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "WorkflowId",
                table: "SysTodoCenter",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BillCode",
                table: "SysWorkflow");

            migrationBuilder.DropColumn(
                name: "BillCode",
                table: "SysTodoCenter");

            migrationBuilder.DropColumn(
                name: "CreateBy",
                table: "SysTodoCenter");

            migrationBuilder.DropColumn(
                name: "WorkflowId",
                table: "SysTodoCenter");

            migrationBuilder.RenameColumn(
                name: "ActivityId",
                table: "SysTodoCenter",
                newName: "BusinessId");

            migrationBuilder.AddColumn<Guid>(
                name: "ProcessInstanceId",
                table: "SysTodoCenter",
                type: "uniqueidentifier",
                nullable: true);
        }
    }
}
